home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 August (Alt)
/
CHIP 2005-08.1.iso
/
program
/
guvenlik
/
syslinux-3.07.exe
/
com32
/
lib
/
strdup.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
2004-11-10
|
185 b
|
18 lines
/*
* strdup.c
*/
#include <string.h>
#include <stdlib.h>
char *strdup(const char *s)
{
int l = strlen(s)+1;
char *d = malloc(l);
if ( d )
memcpy(d, s, l);
return d;
}